package Model
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	
	import mx.resources.IResourceManager;
	import mx.resources.ResourceManager;

	public class SimpleComponent extends EventDispatcher
	{
		private var _description:String;
		private var _id:String;
		private var _quantity:Number;
		protected var internalChangeEvent:Event = new Event("internalChange");
		protected var resourceManager:IResourceManager = ResourceManager.getInstance();
		
		public function SimpleComponent(description:String, quantity:Number = 1)
		{
			this._description = description;
			this._id = id;
			this._quantity = quantity;
		}
		
		public function generateId():String
		{
			return "";
		}

		public function get description():String
		{
			return _description;
		}

		public function set description(value:String):void
		{
			_description = value;
		}

		public function get id():String
		{
			return _id;
		}

		public function set id(value:String):void
		{
			_id = value;
		}

		public function get quantity():Number
		{
			return _quantity;
		}

		public function set quantity(value:Number):void
		{
			_quantity = value;
			this.dispatchEvent(this.internalChangeEvent);
		}
		
		 protected function calculateArea():void
		{
			
		}
	}
}